package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - ERP 产品 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ErpProductRespVO {

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15672")
    @ExcelProperty("产品编号")
    private Long id;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("产品名称")
    private String name;

    @Schema(description = "全拼音（大写）")
    @ExcelProperty("全拼音（大写）")
    private String fullPinyin;

    @Schema(description = "拼音首字母（大写）")
    @ExcelProperty("拼音首字母（大写）")
    private String firstPinyin;

    @Schema(description = "五笔简码（大写）")
    @ExcelProperty("五笔简码（大写）")
    private String wubiShortcode;

    @Schema(description = "产品条码", requiredMode = Schema.RequiredMode.REQUIRED, example = "X110")
    @ExcelProperty("产品条码")
    private String barCode;

    @Schema(description = "产品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11161")
    private Long categoryId;
    @Schema(description = "产品分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "水果")
    @ExcelProperty("产品分类")
    private String categoryName;

    @Schema(description = "单位编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8869")
    private Long unitId;

    @Schema(description = "生产厂家")
    @ExcelProperty("生产厂家")
    private String manufacturer;

    @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "个")
    @ExcelProperty("单位")
    private String unitName;

    @Schema(description = "产品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("产品状态")
    private Integer status;

    @Schema(description = "是否收费")
    @ExcelProperty("是否收费")
    private Long isFree;

    @Schema(description = "是否专机专用")
    @ExcelProperty("是否专机专用")
    private Long isDedicated;

    @Schema(description = "注册证号")
    @ExcelProperty("注册证号")
    private String registCertNum;

    @Schema(description = "医保27位编码")
    @ExcelProperty("医保27位编码")
    private String medicalInsurCode;

    @Schema(description = "产品规格", example = "红色")
    @ExcelProperty("产品规格")
    private String standard;

    @Schema(description = "产品备注", example = "你猜")
    @ExcelProperty("产品备注")
    private String remark;

    @Schema(description = "供应商编号", example = "11161")
    @ExcelProperty("默认供应商")
    private Long supplierId;


//    @Schema(description = "有效期", requiredMode = Schema.RequiredMode.REQUIRED)
//    @ExcelProperty("有效期")
//    private LocalDateTime validityDate;
//
//    @Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED)
//    @ExcelProperty("批次")
//    private String batch;

    @Schema(description = "基础重量（kg）", example = "1.00")
    @ExcelProperty("基础重量（kg）")
    private BigDecimal weight;

    @Schema(description = "采购价格，单位：元", example = "10.30")
    @ExcelProperty("采购价格，单位：元")
    private BigDecimal purchasePrice;

    @Schema(description = "销售价格，单位：元", example = "74.32")
    @ExcelProperty("销售价格，单位：元")
    private BigDecimal salePrice;

    @Schema(description = "最低价格，单位：元", example = "161.87")
    @ExcelProperty("最低价格，单位：元")
    private BigDecimal minPrice;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "是否帶量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "是否带量", converter = DictConvert.class)
    @DictFormat("is_quantity")
    private Integer isQuantity;

    private String  quantityCount;

    private LocalDateTime year;


    @Schema(description = "分配状态")
    private Integer allocationStatus;
    /**
     * 产品名称 name +规格 standard
     */
    private String  fullName;

    private Long dataId;

    @Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("生效日期")
    private LocalDateTime startTime;

    @Schema(description = "截止日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("截止日期")
    private LocalDateTime endTime;


    private LocalDateTime  taskStartTime;

    private LocalDateTime  taskEndTime;
}